import {
    createRouter,
    createWebHashHistory
} from 'vue-router'

import Layout from '~/pages/Layout/index.vue';
import Login from '~/pages/Login/login.vue';
import NotFound from '~/pages/Login/404.vue';
import Home from '~/pages/home.vue';
import Ware_management from '~/pages/ware_management.vue';
import Inware from '~/pages/inware_order.vue';
import Outware from '~/pages/outware_order.vue';



const routes = [

    {
        path:"/menu",
        name:"Layout",
        component:Layout,

        children:[
        {
            path:'/home',
            name:'Home',
            component: Home
        },
        {
            path:"/ware_management",
            name:'ware',
            component:Ware_management
        },
        {
            path:"/inware",
            name:"Inware",
            component:Inware
        },
        {
            path:'/outware',
            name:'Outware',
            component:Outware
        }

        
        ]
        
            
    

    },
    {
        path: "/",
        name: Login,
        component: Login
    },
    {
        path: '/:pathMatch(.*)*',
        name: 'NotFound',
        component: NotFound
    },
]


const router = createRouter({
    history: createWebHashHistory(import.meta.env.VITE_BASE_URL),
    routes
})

export default router